/**
 * 拷贝缓冲区
 * buf.copy(targetBuffer[, targetStart[, sourceStart[, sourceEnd]]]
 * targetBuffer - 要拷贝的 Buffer 对象。
 */

var buffer1 = new Buffer('ABC');
// 拷贝一个缓冲区
var buffer2 = new Buffer(3);
buffer1.copy(buffer2);
console.log("buffer2 content: " + buffer2.toString()); //buffer2 content: ABC